package edu.turtlekit2.warbot.team1;

import java.util.List;

import edu.turtlekit2.warbot.WarBrain;
import edu.turtlekit2.warbot.WarExec;
import edu.turtlekit2.warbot.exec.WarExplorerExec;
import edu.turtlekit2.warbot.message.WarMessageFinal;
import edu.turtlekit2.warbot.percepts.Percept;

/**
 *
 * @author shyzk_000
 */
public class BrainExplorer1 extends WarBrain{
	
	private WarExplorerExec							_mineExec = null;
	
	public BrainExplorer1(WarExplorerExec wee){
		_mineExec = wee;
	}

	@Override
	public String action() {
		WarMessageFinal wmf = _mineExec.getMessage();
		
		List<Percept> list = _mineExec.getPercepts();
		for(int i = 0 ; i < list.size() ; ++i){
			System.out.println(list.get(i));
		}
		
		if(wmf == null){
			_mineExec.setRandomHeading();
		}else{
			System.out.println(wmf);
			_mineExec.setHeading(wmf.getAngle());
		}
		
		return "move";
	}
}
